﻿using Aishow.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Aishow.IDAL
{
  public   interface IAccountService
    {
        /// <summary>
        /// 账户数据服务接口
        /// </summary>
       
            /// <summary>
            /// 用户名是否已存在
            /// </summary>
            /// <param name="userName">用户名</param>
            /// <returns></returns>
            bool ExistUserName(string userName);

            /// <summary>
            /// 手机号是否已存在
            /// </summary>
            /// <param name="mobileNumber">手机号</param>
            /// <returns></returns>
            bool ExistMobileNumber(string mobileNumber);

            /// <summary>
            /// 通过用户名查找登录信息
            /// </summary>
            /// <param name="userName">用户名</param>
            /// <returns></returns>
            TBLogins FindByUserName(string userName);

            /// <summary>
            /// 通过手机号查找登录信息
            /// </summary>
            /// <param name="mobileNumber">手机号</param>
            /// <returns></returns>
            TBLogins FindByMobileNumber(string mobileNumber);

            /// <summary>
            /// 注册用户
            /// </summary>
            /// <param name="login">登录信息</param>
            /// <returns>返回用户Id</returns>
            int Register(TBLogins login);
        }
    }
